<?php

namespace app\xcxapi\controller\v1;
use app\common\controller\XcxController;
use app\xcxapi\service\XcxpayService;

class Xcxpay extends XcxController
{
	/**
	 * User: wufeng
	 * Date: 2020/03/30
	 *
	 * @return mixed
	 */
    public function executionPayment()
    {
		if ($this->request->isPost()) {
			$params = $this->request->param();
			$list = (new XcxpayService($this->type))->executionPayment($params);
			if (1 !== $list['code']) {
				$this->fail($list);
			}
			$this->win($list);
		}
		$this->fail('ILLEGAL_REQUEST');
    }
}
